var regChar=/[A-Za-z]$/;
var regInt=/[0-9-]$/;
var regAlphanumeric=/[A-Za-z0-9]$/;
var regEmail=/^([a-zA-Z0-9_.-])+@(\w+)\.(([a-zA-Z0-9]{2,3})|([a-zA-Z0-9]{2,3}\.[a-zA-Z0-9]{2}))$/;
function checkChar(fieldValue,fieldName){
	 var flag=true; 
	var valChar = document.getElementById(fieldValue).value;
	if(!valChar.match(regChar)&& valChar !=''){
		alert(fieldName+" should be Alphabetic !");
	flag=false;
	}	
	return flag;
}

function checkInt(fieldValue,fieldName){
	 var flag=true; 
	var valInt = document.getElementById(fieldValue).value;
	if(!valInt.match(regInt)&& valInt !=''){
		alert(fieldName+" should be Numeric !");
	flag=false;
	}	
	return flag;
}

function checkEmail(fieldValue,fieldName){
	 var flag=true; 
	var valEmail = document.getElementById(fieldValue).value;
	if(!valEmail.match(regEmail)&& valEmail !=''){
		alert("Invalid "+fieldName);
	flag=false;
	}	
	return flag;
}

function checkAlphanumeric(fieldValue,fieldName){
	 var flag=true; 
	var valAlphanumeric = document.getElementById(fieldValue).value;
	if(!valAlphanumeric.match(regAlphanumeric)&& valAlphanumeric !=''){
		alert(fieldName+" should be Alphanumeric !");
	flag=false;
	}	
	return flag;
}